package com.kunya.product.service.category;


import com.kunya.common.common.ServerResponse;
import com.kunya.product.po.Category;

import java.util.List;

/**
 * @author zp
 * @Description:
 * @date 2018/5/19 15:02
 */
public interface ICategoryService {

    /**
     * 添加新的分类
     * @param categoryName
     * @param parentId
     * @param tablePrefix
     * @return
     */
    ServerResponse addCategory(String categoryName, Long parentId,String tablePrefix);

    /**
     * 更新分类的名称
     * @param categoryId
     * @param categoryName
     * @param tablePrefix
     * @return
     */
    ServerResponse updateCategoryName(Long categoryId, String categoryName,String tablePrefix);

    /**
     * 获取分类ID下的分类
     * @param categoryId
     * @param tablePrefix
     * @return
     */
    ServerResponse<List<Category>> getChildrenParallelCategory(Long categoryId,String tablePrefix);

    ServerResponse<List<Long>> selectCategoryAndChildrenById(Long categoryId,String tablePrefix);

    /**
     * 禁用分类
     * @param categoryId
     * @param tablePrefix
     * @return
     */
    ServerResponse disableCategory(Long categoryId,String tablePrefix);
}
